package mysql

import "gorm.io/gorm"

// 用户表
type User struct {
	gorm.Model
	UserName string `gorm:"type:varchar(50)"`
	Mobile   string `gorm:"type:varchar(50)"`
	Password string `gorm:"type:varchar(50)"`
	HeadImg  string `gorm:"type:varchar(300)"`
}

// 论坛表
type TieBaType struct {
	gorm.Model
	TypeName string `gorm:"type:varchar(50)"`
	Number   string `gorm:"type:varchar(50)"`
}

// 贴吧表
type TieBa struct {
	gorm.Model
	TypeId int64  `gorm:"type:int(50)"`
	Name   string `gorm:"type:varchar(50)"`
}

// 贴子表
type TieZi struct {
	gorm.Model
	TieId   int64  `gorm:"type:int(50)"`
	UserId  int64  `gorm:"type:int(50)"`
	Title   string `gorm:"type:varchar(50)"`
	Content string `gorm:"type:varchar(100)"`
	Likes   int64  `gorm:"type:int(50)"`
}
type TieZiData struct {
	TieZi
	Name     string `gorm:"type:varchar(50)"`
	UserName string `gorm:"type:varchar(50)"`
}

// 评论表
type Comment struct {
	gorm.Model
	UserId  int    `gorm:"type:int(50)"`
	TieZiId int    `gorm:"type:int(50)"`
	Content string `gorm:"type:varchar(50)"`
}

// 喜欢表
type Like struct {
	gorm.Model
	UserId  int `gorm:"type:int(50)"`
	TieZiId int `gorm:"type:int(50)"`
}
